
<script setup>
import { computed, ref } from 'vue';
import CommonAside from '../components/CommonAside.vue';
import CommonHeader from '../components/CommonHeader.vue'
import { useAllDateStore } from '@/stores'
const store = useAllDateStore()

const width = computed(() => store.headerWidth) 
</script>

<template>
<div class="common-layout">
<el-container class="lay-container">

  <el-header   :style="{
    marginLeft: store.isCollapse ? '100px' : '300px', 
    width: store.isCollapse ? 'calc(100% - 90px)' : 'calc(100% - 290px)',
    transition: 'all 0.3s'
  }">
   <CommonHeader></CommonHeader>
   </el-header>
   
  <!-- 左侧组件 -->
  <CommonAside/>
   
  <el-main class="right-main"  :style="{
    marginLeft: store.isCollapse ? '100px' : '300px', 
    width: store.isCollapse ? 'calc(100% - 90px)' : 'calc(100% - 290px)',
    transition: 'all 0.3s'
  }">
<router-view></router-view>
   </el-main>
</el-container>
</div>
</template>

<style scoped lang="less">
.common-layout,.lay-container{
height: 100%;

}
.el-header{
  margin-top: -8px;

  margin-left: 300px;
 background-color:#333 ;
}

.right-main{
  width: 1420px;
    height: 1100px;
    margin-top: -1160px;
    margin-left: 100px;
}
</style>